@extends('layouts.default')  
@section('content')
<div class="box primary">        
    <header>
        <h5>Add Insurances & Documents</h5>
        <!-- .toolbar -->
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div><!-- /.toolbar -->
    </header>
    <div id="div-1" class="body">
        {{ Form::open(array('url' => 'insur_docs/store','files' => true, 
                        'class'=>'form-horizontal','id'=>'form-validate'))
        }} 
        <div class="form-group">
            {{ Form::label('owner', Lang::get('messages.owner').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::text('owner', Input::old('owner'),  array(
                                'class' => 'form-control',
                                'placeholder' => Lang::get('messages.owner')))
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('ownership_cert', Lang::get('messages.ownership_cert').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::radio('ownership_cert', '1', true) }} {{Lang::get('messages.yes')}}
                {{ Form::radio('ownership_cert', '0') }}{{Lang::get('messages.no')}}
            </div>              
        </div>
        <div class="form-group">
            {{ Form::label('authoriz',Lang::get('messages.authorization').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}            
            <div class="col-lg-8">
                {{ Helpers\Helper::date('authoriz', Input::old('authoriz') , array(
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drive_permis', Lang::get('messages.driving_license').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Form::select('drive_permis', array(
                                '' => '', 
                                '1' => Lang::get('messages.active'), 
                                '0' => Lang::get('messages.not_active')),  Input::old('drive_permis'), array( 
                                'class' => 'form-control'))
                }}

            </div>
        </div>
        <div class="form-group">
            {{ Form::label('sgs', Lang::get('messages.sgs').'*', array(
                            'class'=>'control-label col-lg-4')) 
            }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('sgs',  Input::old('sgs') , array(
                                'class' => 'form-control')) 
                }}

            </div>
        </div>  
        <div class="form-group">
            {{ Form::label('sgs_cost', Lang::get('messages.sgs_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('sgs_cost',  Input::old('sgs_cost') , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.sgs_cost'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('sgs_tax', Lang::get('messages.sgs_tax').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('sgs_tax',  Input::old('sgs_tax') , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.sgs_tax'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('tpl', Lang::get('messages.tpl').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('tpl', Input::old('tpl') , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('tpl_cost', Lang::get('messages.tpl_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('tpl_cost',  Input::old('tpl_cost') , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.tpl_cost'))) 
                }}

            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('kasko', Lang::get('messages.kasko').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('kasko', Input::old('kasko') , array(
                                'class' => 'form-control')) 
                }}

            </div>
        </div>
        <div class="form-group">
            {{ Form::label('kasko_cost', Lang::get('messages.kasko_cost').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('kasko_cost',  Input::old('kasko_cost') , array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.kasko_cost'))) 
                }}

            </div>
        </div>
        <div class="form-group">
            {{ Form::label('inter_permis', Lang::get('messages.inter_permission'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('inter_permis', Input::old('inter_permis') , array(
                                'class' => 'form-control')) 
                }}

            </div>
        </div>         
        <div class="form-group">
            {{ Form::label('car', Lang::get('messages.car').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::select('car', $cars, Input::old('car'), array( 
                                'class' => 'form-control')) 
                }}<br/>
                <div id="validation-div" class="">

                </div>
                @if($errors->count() > 0)
                <div class="alert alert-danger">
                    <p>The following errors have occurred:</p><br/>
                    @foreach($errors->all() as $message)
                    {{ Helpers\Helper::macro($message) }}<br/>
                    @endforeach
                </div>
                @endif                
            </div>
        </div>  
        {{ Form::submit(Lang::get('messages.save_btn'), array(
                        'class' => 'btn btn-success btn-line')) }}
        <input type="button" value="{{Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" onClick="history.go(-1);
                return true;">
        {{ Form::close() }}            
    </div>
</div> 
@stop
